package com.java.dao;

import java.sql.Connection;
import java.util.ArrayList;
import java.util.HashMap;

import com.java.db.CommonConnect;
import com.java.util.DaoUtils;

public class Com0102lp02Dao extends CommonDao{
	
	public ArrayList execute(HashMap requestMap,Connection con) {

		ArrayList list = new ArrayList();
		ArrayList retuen_list = new ArrayList();
		try {

			String queryStr = "call com_com0102p02List(?,?,?,?,?,?,?,?,?,?)";

			String param[] = new String[10];
			param[0] = (String) requestMap.get("connGroup");
			param[1] = (String) requestMap.get("user_id");
			param[2] = (String) requestMap.get("ent_id");
			param[3] = (String) requestMap.get("search_combo");
			param[4] = (String) requestMap.get("keyword");
			param[5] = (String) requestMap.get("start_dt");
			param[6] = (String) requestMap.get("close_dt");
			param[7] = (String) requestMap.get("page_row");
			param[8] = (String) requestMap.get("total_row");
			param[9] = (String) requestMap.get("page_no");
			
			list = DaoUtils.select(con, queryStr, param);
			
			retuen_list.add(list);
			
			/*
			list = new ArrayList();
			param = null;
			
			queryStr = "call com_com0102p02List1(?,?,?,?,?,?,?)";
			
			param = new String[7];
			param[0] = (String) requestMap.get("connGroup");
			param[1] = (String) requestMap.get("user_id");
			param[2] = (String) requestMap.get("search_combo");
			param[3] = (String) requestMap.get("keyword");
			param[4] = (String) requestMap.get("start_dt");
			param[5] = (String) requestMap.get("close_dt");
			param[6] = (String) requestMap.get("ent_id");
			
			list = DaoUtils.select(con, queryStr, param);
			retuen_list.add(list);
			*/

		} catch (Exception ee) {
			ee.printStackTrace();
		}finally {
			try{
				if (con!=null) con.setAutoCommit(true);
				if (con!=null) con.close();
			}catch(Exception ee){}
		}
		return retuen_list;
	}
}
